﻿BoxSportSystem.login = (function () {
    var viewModel = kendo.observable({
        proveedoresDataSource: {},
        username: "",
        password: "",

        buscar: function (e) {
            var usu = this.get("username");
            var contra = this.get("password");

            if (usu == "gerente" && contra == "123") {
                alert("Logueo satisfactorio");
                BoxSportSystem.app.getApplication().navigate("view/Proveedores/proveedor.html#homeView");
            };
            if (usu != "gerente" || contra != "123") {
                alert("Usuario o contraseña Incorrectos");
            };

        }
    });

    return {
        viewModel: viewModel
    };
})(window);